// moka's blog : http://designplusplus.blogspot.com/

function creatediv(parent,imgSrc,id,left,top,width,height)
{
	divObj = document.createElement('div');
	divObj.id = id;
	divObj.style.position = "absolute";
	divObj.style.left=left + "px";
	divObj.style.top=top + "px";
	imgObj = document.createElement('img');
	imgObj.src = imgSrc;
	imgObj.width = width;
	imgObj.height = height;
	divObj.appendChild(imgObj);
	document.getElementById(parent).appendChild(divObj);
}

function createStar()
{
	for(i = 0;i<20;i++)
	{
	    var starWidth = Math.floor(52*Math.random())+10;
	    var starX = Math.floor((screen.width - 60) / 20*i+30*Math.random()-15);
	    var starY = Math.floor(150*Math.random());
	    creatediv("header-inner","http://designplusplus.googlecode.com/svn/trunk/MokaBlog/images/star.gif","logo",starX,starY,starWidth,starWidth);
	}
	creatediv("header-inner","http://designplusplus.googlecode.com/svn/trunk/MokaBlog/images/logo.gif","logo",30,80,347,114);
}